home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 1 (Walnut Creek)
/
Aminet - June 1993 [Walnut Creek].iso
/
aminet
/
mus
/
edit
/
amisox_wav.lha
/
README.amiga
< prev
next >
Wrap
Text File
|
1992-05-14
|
12KB
|
257 lines
-----
BRIEF
-----
Here is my Amiga port of the SoundTools kit, including SOX, the Sound
Exchange. The original Unix archive is available via anonymous ftp
from wuarchive.wustl.edu:/usenet/alt.sources/articles/517[6-9].Z. I
have placed all my modifications of the Unix code within #ifdef
delimiters, so the Amiga code should still compile under BSD or SysV
using the original Makefile (Makefile.unix). Use the Makefile.amiga
to compile for AmigaDOS, or use the supplied shell script if you
don't own a compliant "make" program.
---------
NEW STUFF
---------
Support for Windows 3.1 .WAV support is now included. Thanks to Bill
Neisius for the WAV driver. I didn;t have the full patch at the time
I updated the Amiga version to support .WAV, so changes to handlers.c
and everything else are mine (and noted as such--just grep for my
initials). Changes to incorporate this driver were not machine-
dependent; thus you can compile this Amiga patch on your Sparc or
whatever else and (presto!, big flourish) have .wav support there,
too.
---------
COMPILING
---------
To compile with a good "make" program:
1. Copy "Makefile.amiga" to "Makefile".
2. Edit the Makefile according to your setup and preferences.
a. change compiler options to suit your compiler. CC should
equal the name of the program you use to compile (e.g.,
cc for Manx, dcc for DICE, lc for Lattice/SAS).
b. change O to any flags you use for things like optimization
or any other specific methods you want implemented by the
compiler.
c. ar is a program which provides library maintenance under
Unix. It usually requires ranlib, too. Since you have
an Amiga, you won't need to deal with it. Lattice
this little dealie called "oml" which archives object
modules as compiler libs, so if you have Lattice set AR
to "oml" and AR_ARGS to "a" (see your documentation for
more oml details). If you don't own Lattice, you might or
might not have an object module librarian--I'm not
familiar with any of the other Amiga C compilers. There
is, however, a freely distributable librarian available
over the Internet somewhere, and probably on many BBSes,
too. I believe it's by Mike Meyer. If you use this
program, set AR and AR_ARGS according to its
documentation.
d. RM is the name of a program to delete files you no longer
need after compile time. Set it to whatever you use to
delete things. I've commented out a few lines of the
Makefile since c:delete gags if you ask it to delete a
file that doesn't exist, but if your RM handles
nonexistent files, feel free to uncomment these.
e. WILDCARD is a symbol or symbols that your system will
recognize as representing any sequence of characters,
including any subsequence of no characters. The #?
pair won't work, though, since '#' is the symbol in make
for a comment. '*' works on my system, but that's
probably because I use csh as my shell.
f. LHA should be set to the name of any Amiga file archiver.
LHAFLAGS should be whatever archiver flags you like to
use. On lha, -a means "preserve file attributes", -x
means "preserve and use path names", and -Y tells lha not
to compress anything whose compression ratio would be
less than 3%. ARCHIVE should be set to the name of a
file you want to contain the sox distribution. I put this
in mainly for my own amusement, as a counterpart to the
Unix Makefile's shar: object. I find, however, that the
whole concept is quite silly.
g. If you have a 68881 or a 68882 math coprocessor installed
in your Amiga (as does every A3000), you'll probably want
to make the FPU version of sox. Use of the FPU for
floating-point intensive operations can speed the
program's execution on some effects by over 400%. Remove
the hash marks in lines 50 and 51 of the Amiga Makefile to
create the FPU version. Note that the FPU binary is
smaller than the non-FPU version, as it contains no
library code to emulate heavy-duty math functions. You
shouldn't need to place hashes in lines 46-47, but if your
"make" fails, give it a try.
3. To make the sox binary according to the specifications in the
Makefile, enter "make" or "make sox" into your shell (I dearly
hope no one's still using a vanilla CLI...). To make only the
Sound Tools library, enter "make libst.lib". If you didn't
change RM and uncomment the line containing "$(RM)", you may need
to delete any existing libst.lib files in your current directory.
To remove all the ugly object files that you don't need any more,
enter "make clean". Finally, to archive the Amiga SOX basic
distribution for God-knows-what purpose, enter "make archive".
4. Wait for your command prompt.
5. Install the new sox binary wherever you keep things like that.
To compile without a good make:
1. Open a DOS shell, if you don't use it regularly. (I can't blame
you if you don't, but I can blame you if you made it hard to get
get back to it in emergencies.)
2. Follow the instructions for using "Make" above, but ignore
references to Make and Makefile per se, and replace occurences
of "make" in shell commands with "execute maker".
-----------
AMIGA NOTES
-----------
Read the file "sox.man.ascii" for general information. This is a pure
text copy of the troff file "sox.man", though, and as such, it
describes the Unix version. The following are peculiarities to the
Amiga version:
- the ".iff" filename extension and type specifier operates
identically to the ".8svx" extension
- piping as described in the manual does not work. I might try to
fix this, but given the piping means available on the Amiga, it
could be rough. The pipe: device should work on everything but
VOC files as long as you use proper filename extensions or type
specifications, but I can't see why you'd want to use it anyway.
- The Amiga version of sox incorporates a version string, so typing
"version sox" should tell you what version of the binary you have.
- If you want to keep libst.lib, you'll have access to most of sox's
functions through a compiler library as documented in the files
"st.man" (troff) and "st.man.ascii" (ascii). Put this in your
lib: directory if you're interested in it.
- skel stuff, as coded in skel.c and skeleff.c and documented in
st.man[.ascii], is not yet supported. Trying to compile it
under SAS sent out loads of errors, but I didn't think them
immediately worth fixing since skel*.c is only good for expansion
using libst.lib. I may fix these up for a future release.
- The supplied varargs.h is from my local BSD unix machine, and is
used without permission.
And, regarding the Sound Tools library and its documentation
("st.man" for troff, "st.man.ascii" for ascii):
- On the current Unix version of Sound Tools, the library is named
"libst.a". Some old documentation refers to it as "libsk.a".
For the Amiga, replace any occurrence of either of these words
with "libst.lib", the name of the Amiga library.
-----
FILES
-----
*.c C source code for Sound Tools kit and SOX
*.h C header files for ST and SOX
libst.lib Sound Tools compiler library, non-FPU version
libst881.lib Sound Tools compiler library, FPU version
Makefile.amiga Makefile for Amiga version of ST
Makefile.unix Original Unix Makefile
README Original Sound Tools README file
README.amiga Notes on Amiga port
sox Amiga Sound Exchange, non-FPU version
sox.man Original Unix SOX manual, (troff format)
sox.man.ascii Original Unix SOX manual, (ASCII format)
sox881 Amiga Sound Exchange, FPU version
st.man Original Unix Sound Tools Library manual (troff)
st.man.ascii Original Unix Sound Tools Library manual (ASCII)
TODO Things to be done for original Unix distribution
I've supplied a number of scripts for making specific conversions
with sox. These are contained in the archive "scripts.lha", and
further documentation on them is available therein.
----------
LAST NOTES
----------
Windows 3.1 .WAV support is now included; see above.
Some channel conversions on IFF-8SVX files require the creation of
a temporary file which by default is written to the t: logical
device. If you perform any of these conversions, be sure you have
enough free store in t: for such a file.
The FPU version of the Sound Tools library, libst881.lib, must be
linked with a 68881/2 library to resolve math coprocessor calls.
For Lattice/SAS C, use lib:lcm881.lib.
Some of the .c files compile with type warnings, but the binaries
seem to work fine. If you have any trouble, please let me know.
Not all of the type identifiers are immediately obvious; for example,
the type spec for a ulaw sound is "-t .au", rather than "-t ulaw".
You can find all of the type specs buried inside the file
"handlers.c".
The outstanding (only, let's hope) bug in the Amiga version of the
package is that the ami.o module (thus SOX and the libst.lib
routines) does not know how to delete its temp files. If anyone
can show me a good way to do this (perhaps by walking struct
pointers?), I'd be a happy programmer.
When I'm satisfied with the state of the Amiga port, I'll mail it to
the original author, Lance Norskog, in hope that future releases of
and patches to the kit will be Amiga-compatible.
(Incidentally, the whole porting project was really relatively easy.
I'm surprised no one else has done it yet.)
As with the original Sound Tools package, the Amiga SOX and Sound
Tools Library are freely distributable, but the original code is
copyrighted by Lance Norskog. Amiga modifications are copyright
David Champion; they may be distributed or modified in any way so
long as a notice to this effect and a concise description of any
changes are included with the distribution. See the file "README"
for the details on SOX code rights and restrictions. See "wav.c"
for ownership of the WAV driver.
Finally, I suggest that, whenever possible, you use Mike Cramer's
SoundZAP for XXX->IFF conversions; it's generally much faster. I
do. The only time I can really justify using SOX is for effects
other than rate changes and for conversions to types other than IFF.
----------------------
CREDITS & AUTHOR STUFF
----------------------
Thanks to the following folks for help on a few problems I had with
the Amiga's lack of certain functions, and for suggestions on
features to support:
caw@miroc.Chi.IL.US (Christopher A. Wichura)
psd1@midway.uchicago.edu (Pratik S. Dave)
epang@sfu.ca (Eugene Pang)
asd2@optima.rh.uchicago.edu
"--SeebS--" <har@ux.acs.umn.edu>
Raul Deluth Miller-Rockwell <rockwell@socrates.umd.edu>
S.Raybould@fulcrum.bt.co.uk
"Edward D. Berger" <eb15+@andrew.cmu.edu>
Jonathan Potter <jpotter@itd.adelaide.edu.au>
Gordon Keener <flash@unx.sas.com>
webbs@mozart.cs.colostate.edu (Steven Webb (The walking glitch))
fnx!del@pilchuck.data-io.com (Dag Erik Lindberg)
robtu@itx.isc.com
wusel@hactar.hanse.de (Kai 'wusel' Siering)
mlelstv@specklec.mpifr-bonn.mpg.de (Michael van Elst)
Thanks to bill%solaria@hac2arpa.hac.com (Bill Neisius) for supplying
the .WAV driver, and to Rick Richardson for writing it.
If you have any comments on Amiga SOX or on the Sound Tools library,
I may be reached at:
David Champion Internet E-Mail:
5326.5 S. Drexel Ave. Apt. 1A
Chicago, IL 60615 dgc3@midway.uchicago.edu
U.S.A. champion@tira.uchicago.edu
(at least until early summer)
See the file "README" for more information on the original
Sound Tools package and its authors.
Share and enjoy.